home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_emacs.idb / usr / freeware / share / emacs / 19.34 / lisp / cal-iso.elc.z / cal-iso.elc
Emacs Compiled Lisp  |  1998-10-28  |  3.8 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: Emacs Compiled Lisp (other/emacsCompiledLisp).
This format is not currently supported by dexvert.

ConfidenceProgramDetectionMatch TypeSupport
1% dexvert Emacs Compiled Lisp (other/emacsCompiledLisp) magic Unsupported
100% file Emacs/XEmacs v19 byte-compiled Lisp data default
99% file data default
100% TrID Emacs/XEmacs byte-compiled Lisp (generic) default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 3b 45 4c 43 13 00 00 00 | 0a 3b 3b 3b 20 63 6f 6d |;ELC....|.;;; com|
|00000010| 70 69 6c 65 64 20 62 79 | 20 6b 77 7a 68 40 63 68 |piled by| kwzh@ch|
|00000020| 75 72 63 68 79 2e 67 6e | 75 2e 61 69 2e 6d 69 74 |urchy.gn|u.ai.mit|
|00000030| 2e 65 64 75 20 6f 6e 20 | 54 68 75 20 46 65 62 20 |.edu on |Thu Feb |
|00000040| 31 35 20 32 30 3a 31 31 | 3a 31 36 20 31 39 39 36 |15 20:11|:16 1996|
|00000050| 0a 3b 3b 3b 20 66 72 6f | 6d 20 66 69 6c 65 20 2f |.;;; fro|m file /|
|00000060| 67 64 2f 67 6e 75 2f 65 | 6d 61 63 73 2f 31 39 2e |gd/gnu/e|macs/19.|
|00000070| 30 2f 6c 69 73 70 2f 63 | 61 6c 2d 69 73 6f 2e 65 |0/lisp/c|al-iso.e|
|00000080| 6c 0a 3b 3b 3b 20 65 6d | 61 63 73 20 76 65 72 73 |l.;;; em|acs vers|
|00000090| 69 6f 6e 20 31 39 2e 33 | 30 2e 39 31 2e 31 2e 0a |ion 19.3|0.91.1..|
|000000a0| 3b 3b 3b 20 62 79 74 65 | 63 6f 6d 70 20 76 65 72 |;;; byte|comp ver|
|000000b0| 73 69 6f 6e 20 46 53 46 | 20 32 2e 31 30 0a 3b 3b |sion FSF| 2.10.;;|
|000000c0| 3b 20 6f 70 74 69 6d 69 | 7a 61 74 69 6f 6e 20 69 |; optimi|zation i|
|000000d0| 73 20 6f 6e 2e 0a 3b 3b | 3b 20 74 68 69 73 20 66 |s on..;;|; this f|
|000000e0| 69 6c 65 20 75 73 65 73 | 20 6f 70 63 6f 64 65 73 |ile uses| opcodes|
|000000f0| 20 77 68 69 63 68 20 64 | 6f 20 6e 6f 74 20 65 78 | which d|o not ex|
|00000100| 69 73 74 20 69 6e 20 45 | 6d 61 63 73 20 31 38 2e |ist in E|macs 18.|
|00000110| 0a 0a 28 69 66 20 28 61 | 6e 64 20 28 62 6f 75 6e |..(if (a|nd (boun|
|00000120| 64 70 20 27 65 6d 61 63 | 73 2d 76 65 72 73 69 6f |dp 'emac|s-versio|
|00000130| 6e 29 0a 09 20 28 6f 72 | 20 28 61 6e 64 20 28 62 |n).. (or| (and (b|
|00000140| 6f 75 6e 64 70 20 27 65 | 70 6f 63 68 3a 3a 76 65 |oundp 'e|poch::ve|
|00000150| 72 73 69 6f 6e 29 20 65 | 70 6f 63 68 3a 3a 76 65 |rsion) e|poch::ve|
|00000160| 72 73 69 6f 6e 29 0a 09 | 20 20 20 20 20 28 73 74 |rsion)..| (st|
|00000170| 72 69 6e 67 2d 6c 65 73 | 73 70 20 65 6d 61 63 73 |ring-les|sp emacs|
|00000180| 2d 76 65 72 73 69 6f 6e | 20 22 31 39 2e 32 39 22 |-version| "19.29"|
|00000190| 29 29 29 0a 20 20 20 20 | 28 65 72 72 6f 72 20 22 |))). |(error "|
|000001a0| 60 63 61 6c 2d 69 73 6f | 2e 65 6c 27 20 77 61 73 |`cal-iso|.el' was|
|000001b0| 20 63 6f 6d 70 69 6c 65 | 64 20 66 6f 72 20 45 6d | compile|d for Em|
|000001c0| 61 63 73 20 31 39 2e 32 | 39 20 6f 72 20 6c 61 74 |acs 19.2|9 or lat|
|000001d0| 65 72 22 29 29 0a 0a 0a | 28 72 65 71 75 69 72 65 |er"))...|(require|
|000001e0| 20 28 71 75 6f 74 65 20 | 63 61 6c 65 6e 64 61 72 | (quote |calendar|
|000001f0| 29 29 0a 23 40 35 30 33 | 20 54 68 65 20 6e 75 6d |)).#@503| The num|
|00000200| 62 65 72 20 6f 66 20 64 | 61 79 73 20 65 6c 61 70 |ber of d|ays elap|
|00000210| 73 65 64 20 62 65 74 77 | 65 65 6e 20 74 68 65 20 |sed betw|een the |
|00000220| 47 72 65 67 6f 72 69 61 | 6e 20 64 61 74 65 20 31 |Gregoria|n date 1|
|00000230| 32 2f 33 31 2f 31 20 42 | 43 20 61 6e 64 20 44 41 |2/31/1 B|C and DA|
|00000240| 54 45 2e 0a 54 68 65 20 | 60 49 53 4f 20 79 65 61 |TE..The |`ISO yea|
|00000250| 72 27 20 63 6f 72 72 65 | 73 70 6f 6e 64 73 20 61 |r' corre|sponds a|
|00000260| 70 70 72 6f 78 69 6d 61 | 74 65 6c 79 20 74 6f 20 |pproxima|tely to |
|00000270| 74 68 65 20 47 72 65 67 | 6f 72 69 61 6e 20 79 65 |the Greg|orian ye|
|00000280| 61 72 2c 20 62 75 74 0a | 77 65 65 6b 73 20 73 74 |ar, but.|weeks st|
|00000290| 61 72 74 20 6f 6e 20 4d | 6f 6e 64 61 79 20 61 6e |art on M|onday an|
|000002a0| 64 20 65 6e 64 20 6f 6e | 20 53 75 6e 64 61 79 2e |d end on| Sunday.|
|000002b0| 20 20 54 68 65 20 66 69 | 72 73 74 20 77 65 65 6b | The fi|rst week|
|000002c0| 20 6f 66 20 74 68 65 20 | 49 53 4f 20 79 65 61 72 | of the |ISO year|
|000002d0| 20 69 73 0a 74 68 65 20 | 66 69 72 73 74 20 73 75 | is.the |first su|
|000002e0| 63 68 20 77 65 65 6b 20 | 69 6e 20 77 68 69 63 68 |ch week |in which|
|000002f0| 20 61 74 20 6c 65 61 73 | 74 20 34 20 64 61 79 73 | at leas|t 4 days|
|00000300| 20 61 72 65 20 69 6e 20 | 61 20 79 65 61 72 2e 20 | are in |a year. |
|00000310| 20 54 68 65 20 49 53 4f | 0a 63 6f 6d 6d 65 72 63 | The ISO|.commerc|
|00000320| 69 61 6c 20 44 41 54 45 | 20 68 61 73 20 74 68 65 |ial DATE| has the|
|00000330| 20 66 6f 72 6d 20 28 77 | 65 65 6b 20 64 61 79 20 | form (w|eek day |
|00000340| 79 65 61 72 29 20 69 6e | 20 77 68 69 63 68 20 77 |year) in| which w|
|00000350| 65 65 6b 20 69 73 20 69 | 6e 20 74 68 65 20 72 61 |eek is i|n the ra|
|00000360| 6e 67 65 0a 31 2e 2e 35 | 32 20 61 6e 64 20 64 61 |nge.1..5|2 and da|
|00000370| 79 20 69 73 20 69 6e 20 | 74 68 65 20 72 61 6e 67 |y is in |the rang|
|00000380| 65 20 30 2e 2e 36 20 28 | 31 20 3d 20 4d 6f 6e 64 |e 0..6 (|1 = Mond|
|00000390| 61 79 2c 20 32 20 3d 20 | 54 75 65 73 64 61 79 2c |ay, 2 = |Tuesday,|
|000003a0| 20 2e 2e 2e 2c 20 30 20 | 3d 0a 53 75 6e 64 61 79 | ..., 0 |=.Sunday|
|000003b0| 29 2e 20 20 54 68 65 20 | 47 72 65 67 6f 72 69 61 |). The |Gregoria|
|000003c0| 6e 20 64 61 74 65 20 53 | 75 6e 64 61 79 2c 20 44 |n date S|unday, D|
|000003d0| 65 63 65 6d 62 65 72 20 | 33 31 2c 20 31 20 42 43 |ecember |31, 1 BC|
|000003e0| 20 69 73 20 69 6d 61 67 | 69 6e 61 72 79 2e 1f 0a | is imag|inary...|
|000003f0| 28 64 65 66 61 6c 69 61 | 73 20 27 63 61 6c 65 6e |(defalia|s 'calen|
|00000400| 64 61 72 2d 61 62 73 6f | 6c 75 74 65 2d 66 72 6f |dar-abso|lute-fro|
|00000410| 6d 2d 69 73 6f 20 23 5b | 28 64 61 74 65 29 20 22 |m-iso #[|(date) "|
|00000420| 08 89 18 40 29 19 08 89 | 18 41 40 29 1a 08 89 18 |...@)...|.A@)....|
|00000430| 41 41 40 29 1b c4 c5 89 | 89 0b 45 89 18 89 18 41 |AA@)....|..E....A|
|00000440| 41 40 29 53 1e 06 08 89 | 18 89 18 40 29 1e 07 08 |A@)S....|...@)...|
|00000450| 89 18 41 40 29 1a 08 89 | 18 41 41 40 29 1b 5c 6e |..A@)...|.AA@).\n|
|00000460| 0e 07 53 c8 5f 5c 5c 1e | 09 0e 07 ca 56 83 7c 00 |..S._\\.|....V.|.|
|00000470| 0e 09 0e 07 cb 5f cc 5c | 5c cd a5 5a 16 09 0b 89 |....._.\|\..Z....|
|00000480| 1b cb a6 ce 55 85 73 00 | 0b cf a6 ce 55 3f 86 73 |....U.s.|....U?.s|
|00000490| 00 0b d0 a6 ce 55 29 83 | 7c 00 0e 09 54 16 09 0e |.....U).||...T...|
|000004a0| 09 2d 0e 06 d1 5f 5c 5c | 0e 06 cb a5 5c 5c 0e 06 |.-..._\\|....\\..|
|000004b0| cf a5 5b 5c 5c 0e 06 d0 | a5 5c 5c 2a d2 5c 5c 5c |..[\\...|.\\*.\\\|
|000004c0| 22 09 53 d3 5f 5c 5c 5c | 6e ce 55 83 a7 00 d4 82 |".S._\\\|n.U.....|
|000004d0| a9 00 5c 6e 53 5c 5c 2b | 87 22 20 5b 64 61 74 65 |..\nS\\+|." [date|
|000004e0| 20 77 65 65 6b 20 64 61 | 79 20 79 65 61 72 20 63 | week da|y year c|
|000004f0| 61 6c 65 6e 64 61 72 2d | 64 61 79 6e 61 6d 65 2d |alendar-|dayname-|
|00000500| 6f 6e 2d 6f 72 2d 62 65 | 66 6f 72 65 20 31 20 70 |on-or-be|fore 1 p|
|00000510| 72 69 6f 72 2d 79 65 61 | 72 73 20 6d 6f 6e 74 68 |rior-yea|rs month|
|00000520| 20 33 31 20 64 61 79 2d | 6f 66 2d 79 65 61 72 20 | 31 day-|of-year |
|00000530| 32 20 34 20 32 33 20 31 | 30 20 30 20 31 30 30 20 |2 4 23 1|0 0 100 |
|00000540| 34 30 30 20 33 36 35 20 | 33 20 37 20 36 5d 20 38 |400 365 |3 7 6] 8|
|00000550| 20 28 23 24 20 2e 20 35 | 30 35 29 5d 29 0a 23 40 | (#$ . 5|05)]).#@|
|00000560| 35 34 39 20 43 6f 6d 70 | 75 74 65 20 74 68 65 20 |549 Comp|ute the |
|00000570| 60 49 53 4f 20 63 6f 6d | 6d 65 72 63 69 61 6c 20 |`ISO com|mercial |
|00000580| 64 61 74 65 27 20 63 6f | 72 72 65 73 70 6f 6e 64 |date' co|rrespond|
|00000590| 69 6e 67 20 74 6f 20 74 | 68 65 20 61 62 73 6f 6c |ing to t|he absol|
|000005a0| 75 74 65 20 44 41 54 45 | 2e 0a 54 68 65 20 49 53 |ute DATE|..The IS|
|000005b0| 4f 20 79 65 61 72 20 63 | 6f 72 72 65 73 70 6f 6e |O year c|orrespon|
|000005c0| 64 73 20 61 70 70 72 6f | 78 69 6d 61 74 65 6c 79 |ds appro|ximately|
|000005d0| 20 74 6f 20 74 68 65 20 | 47 72 65 67 6f 72 69 61 | to the |Gregoria|
|000005e0| 6e 20 79 65 61 72 2c 20 | 62 75 74 20 77 65 65 6b |n year, |but week|
|000005f0| 73 0a 73 74 61 72 74 20 | 6f 6e 20 4d 6f 6e 64 61 |s.start |on Monda|
|00000600| 79 20 61 6e 64 20 65 6e | 64 20 6f 6e 20 53 75 6e |y and en|d on Sun|
|00000610| 64 61 79 2e 20 20 54 68 | 65 20 66 69 72 73 74 20 |day. Th|e first |
|00000620| 77 65 65 6b 20 6f 66 20 | 74 68 65 20 49 53 4f 20 |week of |the ISO |
|00000630| 79 65 61 72 20 69 73 20 | 74 68 65 0a 66 69 72 73 |year is |the.firs|
|00000640| 74 20 73 75 63 68 20 77 | 65 65 6b 20 69 6e 20 77 |t such w|eek in w|
|00000650| 68 69 63 68 20 61 74 20 | 6c 65 61 73 74 20 34 20 |hich at |least 4 |
|00000660| 64 61 79 73 20 61 72 65 | 20 69 6e 20 61 20 79 65 |days are| in a ye|
|00000670| 61 72 2e 20 20 54 68 65 | 20 49 53 4f 20 63 6f 6d |ar. The| ISO com|
|00000680| 6d 65 72 63 69 61 6c 0a | 64 61 74 65 20 68 61 73 |mercial.|date has|
|00000690| 20 74 68 65 20 66 6f 72 | 6d 20 28 77 65 65 6b 20 | the for|m (week |
|000006a0| 64 61 79 20 79 65 61 72 | 29 20 69 6e 20 77 68 69 |day year|) in whi|
|000006b0| 63 68 20 77 65 65 6b 20 | 69 73 20 69 6e 20 74 68 |ch week |is in th|
|000006c0| 65 20 72 61 6e 67 65 20 | 31 2e 2e 35 32 20 61 6e |e range |1..52 an|
|000006d0| 64 0a 64 61 79 20 69 73 | 20 69 6e 20 74 68 65 20 |d.day is| in the |
|000006e0| 72 61 6e 67 65 20 30 2e | 2e 36 20 28 31 20 3d 20 |range 0.|.6 (1 = |
|000006f0| 4d 6f 6e 64 61 79 2c 20 | 32 20 3d 20 54 75 65 73 |Monday, |2 = Tues|
|00000700| 64 61 79 2c 20 2e 2e 2e | 2c 20 30 20 3d 20 53 75 |day, ...|, 0 = Su|
|00000710| 6e 64 61 79 29 2e 20 20 | 54 68 65 0a 61 62 73 6f |nday). |The.abso|
|00000720| 6c 75 74 65 20 64 61 74 | 65 20 69 73 20 74 68 65 |lute dat|e is the|
|00000730| 20 6e 75 6d 62 65 72 20 | 6f 66 20 64 61 79 73 20 | number |of days |
|00000740| 65 6c 61 70 73 65 64 20 | 73 69 6e 63 65 20 74 68 |elapsed |since th|
|00000750| 65 20 28 69 6d 61 67 69 | 6e 61 72 79 29 20 47 72 |e (imagi|nary) Gr|
|00000760| 65 67 6f 72 69 61 6e 0a | 64 61 74 65 20 53 75 6e |egorian.|date Sun|
|00000770| 64 61 79 2c 20 44 65 63 | 65 6d 62 65 72 20 33 31 |day, Dec|ember 31|
|00000780| 2c 20 31 20 42 43 2e 1f | 0a 28 64 65 66 61 6c 69 |, 1 BC..|.(defali|
|00000790| 61 73 20 27 63 61 6c 65 | 6e 64 61 72 2d 69 73 6f |as 'cale|ndar-iso|
|000007a0| 2d 66 72 6f 6d 2d 61 62 | 73 6f 6c 75 74 65 20 23 |-from-ab|solute #|
|000007b0| 5b 28 64 61 74 65 29 20 | 22 c0 09 c2 5a 21 89 19 |[(date) |"...Z!..|
|000007c0| 41 41 40 29 89 1b 89 c4 | 1d 1e 06 09 c7 c8 89 0e |AA@)....|........|
|000007d0| 06 54 45 21 59 83 2b 00 | 0d c8 5c 5c 15 0e 06 54 |.TE!Y.+.|..\\...T|
|000007e0| 16 06 82 12 00 0d 2a 5c | 5c 1e 09 09 c7 c8 89 0e |......*\|\.......|
|000007f0| 09 45 21 5a ca a5 54 09 | ca a6 0e 09 45 2a 87 22 |.E!Z..T.|....E*."|
|00000800| 20 5b 63 61 6c 65 6e 64 | 61 72 2d 67 72 65 67 6f | [calend|ar-grego|
|00000810| 72 69 61 6e 2d 66 72 6f | 6d 2d 61 62 73 6f 6c 75 |rian-fro|m-absolu|
|00000820| 74 65 20 64 61 74 65 20 | 33 20 61 70 70 72 6f 78 |te date |3 approx|
|00000830| 20 30 20 73 75 6d 20 79 | 20 63 61 6c 65 6e 64 61 | 0 sum y| calenda|
|00000840| 72 2d 61 62 73 6f 6c 75 | 74 65 2d 66 72 6f 6d 2d |r-absolu|te-from-|
|00000850| 69 73 6f 20 31 20 79 65 | 61 72 20 37 5d 20 37 20 |iso 1 ye|ar 7] 7 |
|00000860| 28 23 24 20 2e 20 31 33 | 38 30 29 5d 29 0a 23 40 |(#$ . 13|80)]).#@|
|00000870| 38 36 20 53 74 72 69 6e | 67 20 6f 66 20 49 53 4f |86 Strin|g of ISO|
|00000880| 20 64 61 74 65 20 6f 66 | 20 47 72 65 67 6f 72 69 | date of| Gregori|
|00000890| 61 6e 20 44 41 54 45 2e | 0a 44 65 66 61 75 6c 74 |an DATE.|.Default|
|000008a0| 73 20 74 6f 20 74 6f 64 | 61 79 27 73 20 64 61 74 |s to tod|ay's dat|
|000008b0| 65 20 69 66 20 44 41 54 | 45 20 69 73 20 6e 6f 74 |e if DAT|E is not|
|000008c0| 20 67 69 76 65 6e 2e 1f | 0a 28 64 65 66 61 6c 69 | given..|.(defali|
|000008d0| 61 73 20 27 63 61 6c 65 | 6e 64 61 72 2d 69 73 6f |as 'cale|ndar-iso|
|000008e0| 2d 64 61 74 65 2d 73 74 | 72 69 6e 67 20 23 5b 28 |-date-st|ring #[(|
|000008f0| 26 6f 70 74 69 6f 6e 61 | 6c 20 64 61 74 65 29 20 |&optiona|l date) |
|00000900| 22 08 86 06 00 c1 20 89 | 18 89 18 41 41 40 29 53 |"..... .|...AA@)S|
|00000910| 1a 08 89 18 89 18 40 29 | 1b 08 89 18 41 40 29 1c |......@)|....A@).|
|00000920| 08 89 18 41 41 40 29 1d | 5c 66 0b 53 c6 5f 5c 5c |...AA@).|\f.S._\\|
|00000930| 1e 07 0b c8 56 83 62 00 | 0e 07 0b c9 5f ca 5c 5c |....V.b.|...._.\\|
|00000940| cb a5 5a 16 07 0d 89 1d | c9 a6 cc 55 85 59 00 0d |..Z.....|...U.Y..|
|00000950| cd a6 cc 55 3f 86 59 00 | 0d ce a6 cc 55 29 83 62 |...U?.Y.|....U).b|
|00000960| 00 0e 07 54 16 07 0e 07 | 2d 5c 6e cf 5f 5c 5c 5c |...T....|-\n._\\\|
|00000970| 6e c9 a5 5c 5c 5c 6e cd | a5 5b 5c 5c 5c 6e ce a5 |n..\\\n.|.[\\\n..|
|00000980| 5c 5c 2a 89 1e 10 d1 a6 | 1c d2 0e 10 21 1e 13 d4 |\\*.....|....!...|
|00000990| d5 5c 66 cc 55 83 8f 00 | d1 82 90 00 5c 66 0e 13 |.\f.U...|....\f..|
|000009a0| 89 18 40 29 0e 13 89 18 | 41 41 40 29 24 2b 87 22 |..@)....|AA@)$+."|
|000009b0| 20 5b 64 61 74 65 20 63 | 61 6c 65 6e 64 61 72 2d | [date c|alendar-|
|000009c0| 63 75 72 72 65 6e 74 2d | 64 61 74 65 20 70 72 69 |current-|date pri|
|000009d0| 6f 72 2d 79 65 61 72 73 | 20 6d 6f 6e 74 68 20 64 |or-years| month d|
|000009e0| 61 79 20 79 65 61 72 20 | 33 31 20 64 61 79 2d 6f |ay year |31 day-o|
|000009f0| 66 2d 79 65 61 72 20 32 | 20 34 20 32 33 20 31 30 |f-year 2| 4 23 10|
|00000a00| 20 30 20 31 30 30 20 34 | 30 30 20 33 36 35 20 64 | 0 100 4|00 365 d|
|00000a10| 20 37 20 63 61 6c 65 6e | 64 61 72 2d 69 73 6f 2d | 7 calen|dar-iso-|
|00000a20| 66 72 6f 6d 2d 61 62 73 | 6f 6c 75 74 65 20 69 73 |from-abs|olute is|
|00000a30| 6f 2d 64 61 74 65 20 66 | 6f 72 6d 61 74 20 22 44 |o-date f|ormat "D|
|00000a40| 61 79 20 25 73 20 6f 66 | 20 77 65 65 6b 20 25 64 |ay %s of| week %d|
|00000a50| 20 6f 66 20 25 64 22 5d | 20 36 20 28 23 24 20 2e | of %d"]| 6 (#$ .|
|00000a60| 20 32 31 36 33 29 5d 29 | 0a 23 40 35 37 20 53 68 | 2163)])|.#@57 Sh|
|00000a70| 6f 77 20 65 71 75 69 76 | 61 6c 65 6e 74 20 49 53 |ow equiv|alent IS|
|00000a80| 4f 20 64 61 74 65 20 66 | 6f 72 20 74 68 65 20 64 |O date f|or the d|
|00000a90| 61 74 65 20 75 6e 64 65 | 72 20 74 68 65 20 63 75 |ate unde|r the cu|
|00000aa0| 72 73 6f 72 2e 1f 0a 28 | 64 65 66 61 6c 69 61 73 |rsor...(|defalias|
|00000ab0| 20 27 63 61 6c 65 6e 64 | 61 72 2d 70 72 69 6e 74 | 'calend|ar-print|
|00000ac0| 2d 69 73 6f 2d 64 61 74 | 65 20 23 5b 6e 69 6c 20 |-iso-dat|e #[nil |
|00000ad0| 22 c0 c1 c2 c3 c4 21 21 | 5c 22 87 22 20 5b 6d 65 |".....!!|\"." [me|
|00000ae0| 73 73 61 67 65 20 22 49 | 53 4f 20 64 61 74 65 3a |ssage "I|SO date:|
|00000af0| 20 25 73 22 20 63 61 6c | 65 6e 64 61 72 2d 69 73 | %s" cal|endar-is|
|00000b00| 6f 2d 64 61 74 65 2d 73 | 74 72 69 6e 67 20 63 61 |o-date-s|tring ca|
|00000b10| 6c 65 6e 64 61 72 2d 63 | 75 72 73 6f 72 2d 74 6f |lendar-c|ursor-to|
|00000b20| 2d 64 61 74 65 20 74 5d | 20 35 20 28 23 24 20 2e |-date t]| 5 (#$ .|
|00000b30| 20 32 36 37 30 29 20 6e | 69 6c 5d 29 0a 23 40 36 | 2670) n|il]).#@6|
|00000b40| 30 20 4d 6f 76 65 20 63 | 75 72 73 6f 72 20 74 6f |0 Move c|ursor to|
|00000b50| 20 49 53 4f 20 44 41 54 | 45 3b 20 65 63 68 6f 20 | ISO DAT|E; echo |
|00000b60| 49 53 4f 20 64 61 74 65 | 20 75 6e 6c 65 73 73 20 |ISO date| unless |
|00000b70| 4e 4f 45 43 48 4f 20 69 | 73 20 74 2e 1f 0a 28 64 |NOECHO i|s t...(d|
|00000b80| 65 66 61 6c 69 61 73 20 | 27 63 61 6c 65 6e 64 61 |efalias |'calenda|
|00000b90| 72 2d 67 6f 74 6f 2d 69 | 73 6f 2d 64 61 74 65 20 |r-goto-i|so-date |
|00000ba0| 23 5b 28 64 61 74 65 20 | 26 6f 70 74 69 6f 6e 61 |#[(date |&optiona|
|00000bb0| 6c 20 6e 6f 65 63 68 6f | 29 20 22 c0 c1 c2 0b 21 |l noecho|) "....!|
|00000bc0| 21 21 88 5c 66 86 0e 00 | c5 20 87 22 20 5b 63 61 |!!.\f...|. ." [ca|
|00000bd0| 6c 65 6e 64 61 72 2d 67 | 6f 74 6f 2d 64 61 74 65 |lendar-g|oto-date|
|00000be0| 20 63 61 6c 65 6e 64 61 | 72 2d 67 72 65 67 6f 72 | calenda|r-gregor|
|00000bf0| 69 61 6e 2d 66 72 6f 6d | 2d 61 62 73 6f 6c 75 74 |ian-from|-absolut|
|00000c00| 65 20 63 61 6c 65 6e 64 | 61 72 2d 61 62 73 6f 6c |e calend|ar-absol|
|00000c10| 75 74 65 2d 66 72 6f 6d | 2d 69 73 6f 20 64 61 74 |ute-from|-iso dat|
|00000c20| 65 20 6e 6f 65 63 68 6f | 20 63 61 6c 65 6e 64 61 |e noecho| calenda|
|00000c30| 72 2d 70 72 69 6e 74 2d | 69 73 6f 2d 64 61 74 65 |r-print-|iso-date|
|00000c40| 5d 20 34 20 28 23 24 20 | 2e 20 32 38 38 32 29 20 |] 4 (#$ |. 2882) |
|00000c50| 28 6c 65 74 2a 20 28 28 | 74 6f 64 61 79 20 28 63 |(let* ((|today (c|
|00000c60| 61 6c 65 6e 64 61 72 2d | 63 75 72 72 65 6e 74 2d |alendar-|current-|
|00000c70| 64 61 74 65 29 29 20 28 | 79 65 61 72 20 28 63 61 |date)) (|year (ca|
|00000c80| 6c 65 6e 64 61 72 2d 72 | 65 61 64 20 22 49 53 4f |lendar-r|ead "ISO|
|00000c90| 20 63 61 6c 65 6e 64 61 | 72 20 79 65 61 72 20 28 | calenda|r year (|
|00000ca0| 3e 30 29 3a 20 22 20 28 | 71 75 6f 74 65 20 28 6c |>0): " (|quote (l|
|00000cb0| 61 6d 62 64 61 20 28 78 | 29 20 28 3e 20 78 20 30 |ambda (x|) (> x 0|
|00000cc0| 29 29 29 20 28 69 6e 74 | 2d 74 6f 2d 73 74 72 69 |))) (int|-to-stri|
|00000cd0| 6e 67 20 28 65 78 74 72 | 61 63 74 2d 63 61 6c 65 |ng (extr|act-cale|
|00000ce0| 6e 64 61 72 2d 79 65 61 | 72 20 74 6f 64 61 79 29 |ndar-yea|r today)|
|00000cf0| 29 29 29 20 28 6e 6f 2d | 77 65 65 6b 73 20 28 65 |))) (no-|weeks (e|
|00000d00| 78 74 72 61 63 74 2d 63 | 61 6c 65 6e 64 61 72 2d |xtract-c|alendar-|
|00000d10| 6d 6f 6e 74 68 20 28 63 | 61 6c 65 6e 64 61 72 2d |month (c|alendar-|
|00000d20| 69 73 6f 2d 66 72 6f 6d | 2d 61 62 73 6f 6c 75 74 |iso-from|-absolut|
|00000d30| 65 20 28 31 2d 20 28 63 | 61 6c 65 6e 64 61 72 2d |e (1- (c|alendar-|
|00000d40| 64 61 79 6e 61 6d 65 2d | 6f 6e 2d 6f 72 2d 62 65 |dayname-|on-or-be|
|00000d50| 66 6f 72 65 20 31 20 28 | 63 61 6c 65 6e 64 61 72 |fore 1 (|calendar|
|00000d60| 2d 61 62 73 6f 6c 75 74 | 65 2d 66 72 6f 6d 2d 67 |-absolut|e-from-g|
|00000d70| 72 65 67 6f 72 69 61 6e | 20 28 6c 69 73 74 20 31 |regorian| (list 1|
|00000d80| 20 34 20 28 31 2b 20 79 | 65 61 72 29 29 29 29 29 | 4 (1+ y|ear)))))|
|00000d90| 29 29 29 20 28 77 65 65 | 6b 20 28 63 61 6c 65 6e |))) (wee|k (calen|
|00000da0| 64 61 72 2d 72 65 61 64 | 20 28 66 6f 72 6d 61 74 |dar-read| (format|
|00000db0| 20 22 49 53 4f 20 63 61 | 6c 65 6e 64 61 72 20 77 | "ISO ca|lendar w|
|00000dc0| 65 65 6b 20 28 31 2d 25 | 64 29 3a 20 22 20 6e 6f |eek (1-%|d): " no|
|00000dd0| 2d 77 65 65 6b 73 29 20 | 28 71 75 6f 74 65 20 28 |-weeks) |(quote (|
|00000de0| 6c 61 6d 62 64 61 20 28 | 78 29 20 28 61 6e 64 20 |lambda (|x) (and |
|00000df0| 28 3e 20 78 20 30 29 20 | 28 3c 3d 20 78 20 6e 6f |(> x 0) |(<= x no|
|00000e00| 2d 77 65 65 6b 73 29 29 | 29 29 29 29 20 28 64 61 |-weeks))|)))) (da|
|00000e10| 79 20 28 63 61 6c 65 6e | 64 61 72 2d 72 65 61 64 |y (calen|dar-read|
|00000e20| 20 22 49 53 4f 20 64 61 | 79 20 28 31 2d 37 29 3a | "ISO da|y (1-7):|
|00000e30| 20 22 20 28 71 75 6f 74 | 65 20 28 6c 61 6d 62 64 | " (quot|e (lambd|
|00000e40| 61 20 28 78 29 20 28 61 | 6e 64 20 28 3c 3d 20 31 |a (x) (a|nd (<= 1|
|00000e50| 20 78 29 20 28 3c 3d 20 | 78 20 37 29 29 29 29 29 | x) (<= |x 7)))))|
|00000e60| 29 29 20 28 6c 69 73 74 | 20 28 6c 69 73 74 20 77 |)) (list| (list w|
|00000e70| 65 65 6b 20 64 61 79 20 | 79 65 61 72 29 29 29 5d |eek day |year)))]|
|00000e80| 29 0a 23 40 34 36 20 49 | 53 4f 20 63 61 6c 65 6e |).#@46 I|SO calen|
|00000e90| 64 61 72 20 65 71 75 69 | 76 61 6c 65 6e 74 20 6f |dar equi|valent o|
|00000ea0| 66 20 64 61 74 65 20 64 | 69 61 72 79 20 65 6e 74 |f date d|iary ent|
|00000eb0| 72 79 2e 1f 0a 28 64 65 | 66 61 6c 69 61 73 20 27 |ry...(de|falias '|
|00000ec0| 64 69 61 72 79 2d 69 73 | 6f 2d 64 61 74 65 20 23 |diary-is|o-date #|
|00000ed0| 5b 6e 69 6c 20 22 c0 c1 | c2 0b 21 5c 22 87 22 20 |[nil "..|..!\"." |
|00000ee0| 5b 66 6f 72 6d 61 74 20 | 22 49 53 4f 20 64 61 74 |[format |"ISO dat|
|00000ef0| 65 3a 20 25 73 22 20 63 | 61 6c 65 6e 64 61 72 2d |e: %s" c|alendar-|
|00000f00| 69 73 6f 2d 64 61 74 65 | 2d 73 74 72 69 6e 67 20 |iso-date|-string |
|00000f10| 64 61 74 65 5d 20 34 20 | 28 23 24 20 2e 20 33 37 |date] 4 |(#$ . 37|
|00000f20| 31 39 29 5d 29 0a 28 70 | 72 6f 76 69 64 65 20 28 |19)]).(p|rovide (|
|00000f30| 71 75 6f 74 65 20 63 61 | 6c 2d 69 73 6f 29 29 0a |quote ca|l-iso)).|
+--------+-------------------------+-------------------------+--------+--------+